package cn.mymanagesys.dao.impl;

import cn.mymanagesys.dao.BaseDao;
import cn.mymanagesys.dao.SysUserDao;
import cn.mymanagesys.entity.SysUser;

public class SysUserDaoImpl extends BaseDao<SysUser> implements SysUserDao {
    @Override
    public SysUser selectByLoginName(String loginName) {
        String sql = "SELECT `user_id` as userId, `dept_id` as deptId, `login_name` as loginName, `user_name` as userName, `user_type` as userType, `email`, `phonenumber`, `sex`, `avatar`, `password`, `salt`, `status`, `del_flag` as delFlag, `login_ip` , `login_date` , `pwd_update_date` , `create_by`, `create_time`, `update_by`, `update_time`, `remark` FROM sys_user where login_name=?";
        return super.queryBean(sql,loginName);
    }
}
